#pragma once

#include "INIReader/INIReader.h"

#include <iostream>

void test_INIReader_1()
{
    INIReader reader("test.ini");

    if (reader.ParseError() != 0) 
    {
        std::cout << "Can't load 'test.ini'\n";
        return;
    }

    std::cout    << "Config loaded from 'test.ini': " << std::endl <<
    "version = " << reader.GetInteger("protocol", "version", -1) << std::endl <<
    "name    = " << reader.Get("user", "name", "UNKNOWN") << std::endl <<
    "email   = " << reader.Get("user", "email", "UNKNOWN") << std::endl <<
    "pi      = " << reader.GetReal("user", "pi", -1) << std::endl <<
    "active  = " << reader.GetBoolean("user", "active", true)  << std::endl <<
    "multi   = " << reader.Get("user", "multi", "UNKNOW") << std::endl;
}
